/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package threads;

import data.Store;

/**
 *
 * @author laptop24h
 */
public class outputThread extends Thread {

    private Store store;

    public outputThread(Store store) {
        this.store = store;
    }

    @Override
    public void run() {
        while (true) {
            try {
                String cakeName = store.get();
                System.out.println("Store publisher success: " + cakeName);
                Thread.sleep(1000);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            }
        }

    }

}
